package com.java.controller;

import com.java.dto.RolePermissionDTO;
import com.java.model.Result;
import com.java.service.RolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 角色管理分配权限
 */
@Controller
@RequestMapping("/rolePermission")
public class RolePermissionController {

    @Autowired
    private RolePermissionService rolePermissionService;


    @PostMapping("/save")
    @ResponseBody
    public Result save(@RequestBody RolePermissionDTO rolePermissionDTO) {
        return rolePermissionService.save(rolePermissionDTO);
    }
}
